<?php
namespace App\Exceptions;

class StandardException extends \Exception
{
    protected $literalMessage;
    protected $code;

    public function __construct($message = '服务器繁忙，请稍后重试。', int $code = -1, ...$args)
    {
        $this->literalMessage = $message;
        $this->code = $code;
        parent::__construct($message, $code, ...$args);
    }

    public function getExceptionLiteral()
    {
        return $this->literalMessage;
    }

    public function getExceptionCode()
    {
        return $this->code;
    }
}